<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
	xmlns:s="http://jboss.com/products/seam/taglib"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:a="https://ajax4jsf.dev.java.net/ajax"
	xmlns:rich="http://richfaces.org/rich"
	template="../include/template.xhtml">
    <ui:define name="title">
		<h:outputText value="用户角色分配--" />
	</ui:define>
	<ui:define name="title">
		<h:outputText value="项目--" />
	</ui:define>

	<ui:define name="content">
		<style type="text/css">
<!--
.inputClass {
	border: 1px solid #6699CC;
	width: 300px;
	margin-left: 4px;
}
-->
</style>
		<link type="text/css" rel="stylesheet" href="../css/global.css" />
		<br />
		<h:graphicImage value="../images/provider.bmp"></h:graphicImage>
		<h:outputText value="角色分配" class="strong"></h:outputText>
		<rich:separator lineType="double" height="2px" />
		<rich:spacer width="30px"></rich:spacer>
		<s:div styleClass="right_center">
			<s:link value="管理" view="/admin/index.xhtml" />
			<h:outputText value=" --> 用户:#{userDatailAction.user.nickName}" />

		</s:div>

		<s:div styleClass="right_center">
			<h:form id="roleForm">
				<rich:listShuttle id="roleList" sourceValue="#{roleAction_getRoles}"
					targetValue="#{userDatailAction.user.roles}" var="vrole"
					converter="#{roleConverter}" listHeight="300" listWidth="300"
					sourceCaptionLabel="所有角色列表"
					targetCaptionLabel="#{userDatailAction.user.nickName}拥有角色"
					copyAllControlLabel="全部" copyControlLabel="赋予"
					removeControlLabel="移除" removeAllControlLabel="移除所有">
					
					<rich:column>
						<h:outputText value="#{vrole.name}"></h:outputText>
					</rich:column>
					
				</rich:listShuttle>
				 <a:commandButton value="提交" action="#{roleAction.saveRole(userDatailAction.user)}" reRender="roleForm"/>
			</h:form>
		</s:div>
		
	</ui:define>
</ui:composition>
